home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / circuits / pcb-1.000 / pcb-1 / pcb-1.3 / dialog.h < prev    next >
C/C++ Source or Header  |  1995-02-26  |  2KB  |  69 lines

  1. /*
  2.  *                            COPYRIGHT
  3.  *
  4.  *  PCB, interactive printed circuit board design
  5.  *  Copyright (C) 1994,1995 Thomas Nau
  6.  *
  7.  *  This program is free software; you can redistribute it and/or modify
  8.  *  it under the terms of the GNU General Public License as published by
  9.  *  the Free Software Foundation; either version 2 of the License, or
  10.  *  (at your option) any later version.
  11.  *
  12.  *  This program is distributed in the hope that it will be useful,
  13.  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.  *  GNU General Public License for more details.
  16.  *
  17.  *  You should have received a copy of the GNU General Public License
  18.  *  along with this program; if not, write to the Free Software
  19.  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  *
  21.  *  Contact addresses for paper mail and Email:
  22.  *  Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany
  23.  *  Thomas.Nau@rz.uni-ulm.de
  24.  *
  25.  *  RCS: $Header: dialog.h,v 2.1 94/09/28 14:26:08 nau Exp $
  26.  */
  27.  
  28. /* prototypes for dialog routines
  29.  */
  30.  
  31. #ifndef    __DIALOG_INCLUDED__
  32. #define    __DIALOG_INCLUDED__
  33.  
  34. #include "global.h"
  35.  
  36. /* ---------------------------------------------------------------------------
  37.  * default return codes for buttons
  38.  */
  39. #define    CANCEL_BUTTON    0
  40. #define    OK_BUTTON        1
  41.  
  42. /* ---------------------------------------------------------------------------
  43.  * some useful types
  44.  */
  45. typedef struct                        /* a dialogs buttons */
  46. {
  47.     char            *Name,            /* the widgets name */
  48.                     *Label;            /* the buttons text */
  49.     XtCallbackProc    Callback;        /* the buttons select-handler */
  50.     XtPointer        ClientData;        /* data passed to the handler */
  51.     Widget            W;                /* the button widget itself */
  52. } DialogButtonType, *DialogButtonTypePtr;
  53.  
  54.  
  55. int            DialogEventLoop(int *);
  56. Widget        AddButtons(Widget, Widget, DialogButtonTypePtr, size_t);
  57. Widget        CreateDialogBox(char *, DialogButtonTypePtr, size_t);
  58. void        StartDialog(Widget);
  59. void        EndDialog(Widget);
  60. void        MessageDialog(char *);
  61. void        MessagePrompt(char *);
  62. void        FinishInputDialog(Boolean);
  63. char        *GetUserInput(char *, char *);
  64. void        AboutDialog(void);
  65. Boolean        GetOKForDataLoss(void);
  66. Boolean        ConfirmDialog(char *);
  67.  
  68. #endif
  69.